package 平方数;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long x = in.nextLong();
        long res1 = (long) Math.sqrt(x);
        long res2 = res1+1;
        long res = x - res1 * res1 < res2 * res2 - x ? res1 * res1 : res2 * res2;
        System.out.println(res);
    }
}
